//
//  SouFunJRController.m
//  SouFunJRAPP
//
//  Created by 许博 on 16/5/20.
//  Copyright © 2016年 许博. All rights reserved.
//

#import "SouFunJRController.h"

@interface SouFunJRController ()


@end

@implementation SouFunJRController

- (NSString *)sumNum1:(NSString *)num1 num2:(NSString *)num2 {
    NSInteger n1 = [num1 integerValue];
    NSInteger n2 = [num2 integerValue];
    NSInteger sum = n1 + n2;
    return [NSString stringWithFormat:@"%ld",(long)sum];
    
}

- (IBAction)sumClick {
    NSString *result = [self sumNum1:self.Num1Txt.text num2:self.Num2Txt.text];
    self.resultLabel.text = result;
}



- (IBAction)dismiss {
    [self dismissViewControllerAnimated:YES completion:nil];
}

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.
}

- (instancetype)initWithControllerName:(NSString *)controllerName {
    if (self = [super init]) {
        _controllerName = controllerName;
    }
    return self;
}



@end
